package com.meal.base.test.DesignMode.singleton;

/**
 * @program: meal->StarveMode
 * @description: 饿汉模式
 * @author: yangzhanghui
 * @create: 2020-04-03 16:10
 **/
public class StarveMode {

    private static final StarveMode starveMode = new StarveMode();//自有永有的神单例

    private StarveMode(){}//构造方法私有化

    public static StarveMode getInstance(){//请神方法公开化
        return starveMode;
    }
}
